package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    List<Long> getSetmealIdsByDishId(List<Long> ids);

    /*批量添加套餐和菜品的关联关系*/
    void insertSetmealDishBatch(List<SetmealDish> setmealDishes);

    /*批量删除套餐和菜品的关联关系*/
    void deleteBySetmealIdBatch(List<Long> ids);

    /*根据套餐id查询套餐和菜品的关联关系*/
    @Select("select * from sky_take_out.setmeal_dish where setmeal_id = #{id}")
    List<SetmealDish> getBySetmealId(Long id);
}
